Anderson was out of contract with the Clarets and the 24-year-old has now made a permanent move to the Keepmoat Stadium, having been on loan with Rovers since January.
“I'm really happy to get the deal done quickly. It means I can now relax with my future sorted and get ready for the start of pre-season," he said.
“It's important for any player, and with me being out of contract at Burnley I wanted to get it done. I didn't want to be going away and worrying about what was going to happen.
“Everything to do with the club made me want to stay here. The manager was great with me during my loan spell and I got on well with all the lads."